package com.qianli.cashmama.product.facade.enums;

/**
 * Author: Karl
 * Date: 2020/10/23 上午10:48
 */
public enum ProductShelfTypeEnum {
    TYPE1(1),
    TYPE2(2),
    TYPE3(3),
    TYPE4(4),
    TYPE5(5),
    TYPE6(6),
    TYPE7(7),
    TYPE8(8),
    TYPE9(9),
    ;

    private Integer type;

    ProductShelfTypeEnum(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public ProductShelfTypeEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public static ProductShelfTypeEnum getEnum(Integer type) {
        for (ProductShelfTypeEnum enums : ProductShelfTypeEnum.values()) {
            if (enums.getType().equals(type)) {
                return enums;
            }
        }
        return null;
    }
}
